#ifndef STRUCTS_H
#define STRUCTS_H

#include <time.h>

#include "modes.h"

#define PLUGIN_SIG struct command *command
#define PLUGIN(name) void * name (void *command)

struct arguments {
	char *name;
	char *value;
};

struct arg_group {
	int length;
	struct arguments *args;
};

struct command {
	char *command;
	unsigned int mode_num;
	unsigned int num_history_points;
	struct history_point *history_points;
	time_t wake;
	struct arg_group *args;
	void *data;
};

struct mode {
    char *name;
    char *long_name;
    /* possibly get rid of the next two variables? */
    unsigned int num_args;
    char *arg_names;
    void * (*pt2func) (void *);
};

struct history_point {
    unsigned int slept;
    unsigned int ran;
};

struct global_args {
    char *command;
    unsigned int mode;
    unsigned int iterations;
    unsigned int lower_sleep_bound;
    unsigned int upper_sleep_bound;
    unsigned int default_sleep;
};

#endif
